<?php
/**
 * 访客控制器
 * User: Woozee
 * Date: 2021/1/17
 * Time: 16:05
 */

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\BaseController;
use App\Services\VisitorService;
use Illuminate\Http\Request;

class VisitorController extends BaseController
{
    protected VisitorService $visitorService;

    public function __construct(VisitorService $visitorService)
    {
        $this->visitorService = $visitorService;
    }

    /**
     * @apidoc 访客列表 | Admin
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function list(Request $request)
    {
        $resp = $this->visitorService->getList($request);

        return \ApiResponse::success($resp);
    }
}
